<template>
	<view></view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				buildName:"",
				buildList:[],
				constructionList:[]
			}
		},
		onLoad(opt) {
			console.log(opt)
			this.getRequest();
		},
		onShow() {
		},
		methods: {
			goToPage(path){
				uni.navigateTo({
					url:path
				})
			},
			getRequest(){
				var then = this;
				uni.request({
					method:'POST',
					url:"https://baiyi.kent.work/api/v1/system/getIndexData",
					// success: (res) => {
						
					// },
					success(res) {
						console.log(res);
						//获取buildList中的下标为2的数据 楼盘名称
						then.buildName = res.data.data.buildList[2].name
						then.buildList = res.data.data.buildList;
					},
					fail() {
						
					},
					complete() {
						
					}
				})
			},
		}
	}
</script>

<style>
</style>
